#!/usr/bin/env bash

# global settings
yabai -m config window_placement second_child

yabai -m config window_opacity off
yabai -m config window_opacity_duration 0.0
yabai -m config active_window_opacity 1.0
yabai -m config normal_window_opacity 0.9

yabai -m config layout bsp
yabai -m config top_padding 16
yabai -m config bottom_padding 16
yabai -m config left_padding 16
yabai -m config right_padding 16
yabai -m config window_gap 16

# ignore these apps
yabai -m rule --add app="^System Settings$" manage=off
yabai -m rule --add app="^Alfred Preferences$" manage=off
yabai -m rule --add app="^Messages$" manage=off
yabai -m rule --add app="^Music$" manage=off
yabai -m rule --add app="Microsoft Teams$" manage=off
yabai -m rule --add app="^CleanShot X$" manage=off
yabai -m rule --add app="^CleanMyMac X$" manage=off
yabai -m rule --add app="^1Password$" manage=off
yabai -m rule --add app="^Raycast$" manage=off
yabai -m rule --add app="^Ivory$" manage=off
yabai -m rule --add app="^Finder$" manage=off

# mouse support
yabai -m config mouse_modifier fn
yabai -m config mouse_action1 move
yabai -m config mouse_action2 resize
yabai -m config mouse_follows_focus off
yabai -m c config focus_follows_mouse off

